<?php if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' ); 

$iCol = 1;
//Number of featured products to show per row
$featured_per_row = 4;
//Set the cell width
$cellwidth = intval( (100 / $featured_per_row) );

if( empty( $featured_products )) {
	return; // Do nothing, if there are no Featured!
}
echo "<h3>".$VM_LANG->_('VM_FEATURED_PRODUCT')."</h3>";

foreach( $featured_products as $featured ) {
	?>
    <div id="productFeatured">
    	             
                <a title="<?php echo $featured["product_name"] ?>" href="<?php $sess->purl(URL."index.php?option=com_virtuemart&amp;page=shop.product_details&amp;flypage=".$featured["flypage"]."&amp;product_id=".$featured["product_id"]) ?>"> 
				<?php echo ps_product::image_tag( $featured["product_thumb"], "class=\"browseProductImage\" border=\"0\" alt=\"".$featured["product_name"]."\"");?>
                </a>
                
                <br />
                  <div class="titleProductFeatured">
         <a title="<?php echo $featured["product_name"] ?>" href="<?php $sess->purl(URL."index.php?option=com_virtuemart&amp;page=shop.product_details&amp;flypage=".$featured["flypage"]."&amp;product_id=".$featured["product_id"]) ?>">  <?php echo $featured["product_name"] ?>  </a>            
         </div>
         
         <div class="priceProductFeatured">
            Nuestro Precio:<br/>
            </div>
   			<?php echo $featured['product_price'] ?>
            
            <br />
            <!-- ?php echo $featured['product_s_desc'] ?><br /-->
            
            <!--?php echo $featured['form_addtocart'] ?-->
	</div>
    

	<?php
	// Do we need to close the current row now?
	if ($iCol == $featured_per_row) { // If the number of products per row has been reached
		echo "<br style=\"clear:both;\" />\n";
		$iCol = 1;
	}
	else {
		$iCol++;
		}
	}
	?>

<br style="clear:both;" />